package cn.edu.lingnan.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Component
/**
 * @ConfigurationProperties 作用：
 * 将配合文件中的每一个属性的值，映射到这个组件中
 * 进行属性的绑定
 * 参数perfix = "person": 将配置文件中的person下面的属性一一对应
 */
@ConfigurationProperties(prefix = "person")
public class Person {

    private String name;
    private Integer age;
    private Date birthday;
    private Map<String,Object> maps;
    private List<Object> lists;
    private Dog dog;
    private Boolean happy;



}
